package com.lin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lin.mapper.AuditQueryMapper;
import com.lin.pojo.MApply;
import com.lin.pojo.PageVo;
import com.lin.service.AUditQueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AUditQueryServiceImpl extends ServiceImpl<AuditQueryMapper,MApply> implements AUditQueryService {
    @Autowired
    AuditQueryMapper auditQueryMapper;

    @Override
    public PageVo<MApply> QueryBySelection(MApply mApply, int pageno, int pagesize) {
        PageHelper.startPage(pageno,pagesize);
        List<MApply> list=auditQueryMapper.QueryBySelection(mApply);
        PageInfo<MApply> page=new PageInfo<MApply>(list);
        PageVo<MApply> pageVo= new PageVo<MApply>();
        pageVo.setTotal(page.getTotal());
        pageVo.setRows(page.getList());
        return pageVo;
    }
}
